package com.biz.model.Hmodel.order;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by lzq.
 */

@Entity
@Table(name = "order_detail")
public class TOrderDetail {
    private String id;
    private String orderId;
    private String goodsId;
    private Integer count;
    private Double price;
    private Double goodsTotal;
    private Short state;
    private Short isdel;
    private Date createTime;
    private Date confirmTimes;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "orderId")
    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    @Basic
    @Column(name = "goodsId")
    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    @Basic
    @Column(name = "count")
    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    @Basic
    @Column(name = "price")
    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    @Basic
    @Column(name = "goodsTotal")
    public Double getGoodsTotal() {
        return goodsTotal;
    }

    public void setGoodsTotal(Double goodsTotal) {
        this.goodsTotal = goodsTotal;
    }

    @Basic
    @Column(name = "state")
    public Short getState() {
        return state;
    }

    public void setState(Short state) {
        this.state = state;
    }

    @Basic
    @Column(name = "isdel")
    public Short getIsdel() {
        return isdel;
    }

    public void setIsdel(Short isdel) {
        this.isdel = isdel;
    }

    @Basic
    @Column(name = "createTime")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "confirmTimes")
    public Date getConfirmTimes() {
        return confirmTimes;
    }

    public void setConfirmTimes(Date confirmTimes) {
        this.confirmTimes = confirmTimes;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TOrderDetail that = (TOrderDetail) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (orderId != null ? !orderId.equals(that.orderId) : that.orderId != null) return false;
        if (goodsId != null ? !goodsId.equals(that.goodsId) : that.goodsId != null) return false;
        if (count != null ? !count.equals(that.count) : that.count != null) return false;
        if (price != null ? !price.equals(that.price) : that.price != null) return false;
        if (goodsTotal != null ? !goodsTotal.equals(that.goodsTotal) : that.goodsTotal != null) return false;
        if (state != null ? !state.equals(that.state) : that.state != null) return false;
        if (isdel != null ? !isdel.equals(that.isdel) : that.isdel != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (confirmTimes != null ? !confirmTimes.equals(that.confirmTimes) : that.confirmTimes != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (orderId != null ? orderId.hashCode() : 0);
        result = 31 * result + (goodsId != null ? goodsId.hashCode() : 0);
        result = 31 * result + (count != null ? count.hashCode() : 0);
        result = 31 * result + (price != null ? price.hashCode() : 0);
        result = 31 * result + (goodsTotal != null ? goodsTotal.hashCode() : 0);
        result = 31 * result + (state != null ? state.hashCode() : 0);
        result = 31 * result + (isdel != null ? isdel.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (confirmTimes != null ? confirmTimes.hashCode() : 0);
        return result;
    }
}
